package com.palm.easy.domain;

import java.io.Serializable;

public class Service implements Serializable {
    //服务唯一ID
    private String name;

    //服务名，网关映射和服务管理用
    private String serviceName;

    //服务别称
    private String title;

    //服务是否启用，禁用的服务不会启动，也不会出现在映射列表，服务发现列表
    private boolean enabled;

    //是否映射到网关
    private boolean mapping;
    //映射路径，规则为 http://server:port/mappingPath/ => /serviceName/
    private String mappingPath;
    private String mappingSetting;
    //是否自动启动
    private boolean auto;


    //所属服务器
    private String server;


    //进程PID
    private Long processId;

    //对外端口
    private int port;

    //服务是否在运行
    private boolean running;

    private boolean found;
    //contextPath，用于服务发现调用时的路径，规则为： http://server:port/contextPath/path => /serviceName/path
    private String contextPath;

    private String url;
    //首页,指定后可直接跳转，描述性字段
    private String home;
    //备注
    private String memo;

    private String type="jar";//jar command url
//    private String file;
    //command 模式下的workDir,jar模式固定为jar所在目录（service.name命名）
    private String workDir;
    //command 模式下命令
    private String commands;
    //jar 模式下使用
    private String arguments;
    //jar 模式下使用
    private String vmOptions;

    public String getLastStartTime() {
        return lastStartTime;
    }

    public void setLastStartTime(String lastStartTime) {
        this.lastStartTime = lastStartTime;
    }

    private String lastStartTime;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getServer() {
        return server;
    }

    public void setServer(String server) {
        this.server = server;
    }


    public Long getProcessId() {
        return processId;
    }

    public void setProcessId(Long processId) {
        this.processId = processId;
    }

    public String getCommands() {
        return commands;
    }

    public void setCommands(String commands) {
        this.commands = commands;
    }

    public String getVmOptions() {
        return vmOptions;
    }

    public void setVmOptions(String vmOptions) {
        this.vmOptions = vmOptions;
    }

    public String getArguments() {
        return arguments;
    }

    public void setArguments(String arguments) {
        this.arguments = arguments;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getContextPath() {
        return contextPath;
    }

    public void setContextPath(String contextPath) {
        this.contextPath = contextPath;
    }

    public String getHome() {
        return home;
    }

    public void setHome(String home) {
        this.home = home;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public boolean isMapping() {
        return mapping;
    }

    public void setMapping(boolean mapping) {
        this.mapping = mapping;
    }

    public boolean isAuto() {
        return auto;
    }

    public void setAuto(boolean auto) {
        this.auto = auto;
    }

    public boolean isRunning() {
        return running;
    }

    public void setRunning(boolean running) {
        this.running = running;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getWorkDir() {
        return workDir;
    }

    public void setWorkDir(String workDir) {
        this.workDir = workDir;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }


    public String getMappingPath() {
        return mappingPath;
    }

    public void setMappingPath(String mappingPath) {
        this.mappingPath = mappingPath;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public String getMappingSetting() {
        return mappingSetting;
    }

    public void setMappingSetting(String mappingSetting) {
        this.mappingSetting = mappingSetting;
    }

    public boolean isFound() {
        return found;
    }

    public void setFound(boolean found) {
        this.found = found;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
